package com.ruoyi.web.controller.pfmApplicationController;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.domain.DunApplication;
import com.ruoyi.service.IDunApplicationService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/ruoyi/pfmapplication")
public class pfmApplicationController extends BaseController {
    private String prefix = "ruoyi/pfmapplication";
    @Autowired
    private IDunApplicationService dunApplicationService;

    @RequiresPermissions("ruoyi:pfmapplication:view")
    @GetMapping()
    public String application() {
        return prefix + "/pfmapplication";
    }
    @RequiresPermissions("ruoyi:pfmapplication:list")
    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list(DunApplication dunApplication)
    {
        startPage();
        List<DunApplication> list = dunApplicationService.selectDunApplicationList(dunApplication);
        return getDataTable(list);
    }
}
